function image_out = deform_image_dt(image_in, dvf_y, dvf_x, dvf_z);
   
    [y,x,z] = ndgrid(1:size(image_in,2),1:size(image_in,2), 1:size(image_in,3));
%     [x,y,z] = meshgrid(1:size(image_in,2),1:size(image_in,1), 1:size(image_in,3));

yi = y+dvf_y;
xi = x+dvf_x;
zi = z+dvf_z;

% tic
% image_scan_pseudo_interp = interpn(image_ref,yi,xi,zi);%mirt3D_mexinterp
% interp3_toc = toc

%Faster version of interp3;
% tic
image_out = mirt3D_mexinterp(double(image_in),double(xi),double(yi),double(zi));%,method,exterpval);
% mirt_toc = toc

    
end